package com.njworkorder.Service.Impl;

import com.github.yulichang.base.MPJBaseServiceImpl;
import com.github.yulichang.wrapper.MPJLambdaWrapper;
import com.njworkorder.Entity.AdministrativeOrganization;
import com.njworkorder.Entity.AdministrativePersonnel;
import com.njworkorder.Entity.SecurityCheck;
import com.njworkorder.Service.SecurityCheckService;
import com.njworkorder.Mapper.SecurityCheckMapper;
import com.njworkorder.VO.SecurityCheckVo;
import org.springframework.stereotype.Service;

/**
* @author iron
* @description 针对表【security_check】的数据库操作Service实现
* @createDate 2025-03-06 10:19:02
*/
@Service
public class SecurityCheckServiceImpl extends MPJBaseServiceImpl<SecurityCheckMapper, SecurityCheck>
    implements SecurityCheckService{

    @Override
    public MPJLambdaWrapper<SecurityCheck> getMPJWrapper() {
        return new MPJLambdaWrapper<SecurityCheck>()
                .selectAll(SecurityCheck.class)
                .leftJoin(AdministrativeOrganization.class, AdministrativeOrganization::getId, SecurityCheck::getProjectPartnerId, ext ->
                        ext.selectAs(AdministrativeOrganization::getName, SecurityCheckVo::getProjectPartnerName))
                .leftJoin(AdministrativePersonnel.class, AdministrativePersonnel::getId, SecurityCheck::getCreateApId, ext ->
                        ext.selectAs(AdministrativePersonnel::getName, SecurityCheckVo::getCreateApName));
    }
}




